package com.gitee.luosl.cola.lang.function.checked;

import com.gitee.luosl.cola.lang.function.Consumer3;

public interface CheckedConsumer3<T1, T2, T3> {

    void accept(T1 t, T2 t2, T3 t3) throws Throwable;

    default Consumer3<T1, T2, T3> toConsumer() {
        return (t1, t2, t3) -> {
            try {
                accept(t1, t2, t3);
            } catch (Throwable throwable) {
                throw new CheckedException(throwable);
            }
        };
    }
}
